<!--
 * @Descripttion: 
 * @version: 
 * @Author: 川杨
 * @Date: 2022-02-28 13:46:54
 * @LastEditors: 川杨
 * @LastEditTime: 2022-03-02 19:07:52
-->
<template>
  <span v-html="innerHtml" ref="commentHtml" @click.stop="handleOpenUser"></span>
</template>
<script>
import {atTextToHtml} from '@src/util/atText';
export default{
  name:'biz-comment-html',
  props:{
    html:{
      type:String,
      default:''
    }
  },
  computed:{
    innerHtml(){
      return atTextToHtml(this.html)
    }
  },
  methods:{
    handleOpenUser(e){
      if(e.target.attributes['data']){
        this.showUser({user:JSON.parse(e.target.attributes['data'].value), el:e})
      }
    },
    showUser(item){
      this.$OpenUserCard(item)
    }
  }

}
</script>